<s_templ_list>

<script type="text/javascript">
//<![CDATA[
$(function(){
	$("#frm-search").submit(function(){
		if($("[name=sch_keyword]").val().trim()){
			location.replace('/font/board/list/id/[##_id_##]/sch_keyname/'+encodeURIComponent($("[name=sch_keyname]").val())+'/sch_keyword/'+encodeURIComponent($("[name=sch_keyword]").val()));
		}
		return false;
	});
});
	
//]]>
</script>


<!-- 검색 -->
<table>
<tr>
	<td align="right" style="padding-bottom:15px;" >
		<form id="frm-search">
		<table>
		<tr>
			<td style="padding-right:2px;">
				<select name="sch_keyname" style="width:100px;height:30px">
					<option value="title">제목</option>
					<option value="content">내용</option>
					<option value="writer">작성자</option>
				</select>
			</td>
			<td><input type="text" name="sch_keyword" class="txt-box" style="width:150px;" /></td>
			<td><input type="submit" value="검색" class="bt" /></td>
			<td style="padding-left:3px;"><span class="bt"><a href="[##_brd_btn_write_##]" title="Home">글쓰기</a></span></td>
		</tr>
		</table>
		</form>
	</td>
</tr>
<tr>
<td class="text_basic">
<table width="100%" >

<!-- 리스트 -->
<tr><td colspan="6" height="1" bgcolor="#fe6700"></td></tr>
<tr bgcolor="#f2f2f2" align="center">
	<td width="70" style="padding:8px 0 9px 0;"><strong>번호</strong></td>
	<td width="420" style="padding:8px 0 9px 0;"><strong>제목</strong></td>
	<td width="90" style="padding:8px 0 9px 0;"><strong>작성자</strong></td>
	<td width="85" style="padding:8px 0 9px 0;"><strong>등록일</strong></td>
	<td width="55" style="padding:8px 0 9px 0;"><strong>조회수</strong></td>
	<td width="50" style="padding:8px 0 9px 0;"><strong>첨부</strong></td>
</tr>
<tr><td colspan="6" height="1" bgcolor="#c8c8c8"></td></tr>

<s_board_list>
<tr align="center" style="height:45px; line-height:43px;">
	<td>[##_brd_list_no_##]</td>
	<td align="left">[##_brd_list_reply_##]<a href="[##_brd_list_view_link_##]" class="[##_brd_list_css_reply_##]">[##_brd_list_icon_reply_##][##_brd_list_title_##]</a>[##_brd_list_new_##]</td>
	<td>[##_brd_list_writer_##]</td>
	<td>[##_brd_list_date_##]</td>
	<td>[##_brd_list_visited_##]</td>
	<td style="padding-top:14px;">[##_brd_list_icon_file_##]</td>
</tr>
<tr><td colspan="6" height="1" bgcolor="#e6e6e6"></td></tr>
</s_board_list>
</table>
</td>
</tr>

<!-- pageNO -->
<tr><td height="25"></td></tr>
<tr>
<td align="center">
<div class="pagingNo">
	[##_PAGING_##]
	<!--<a href="#"><img src="/theme/[##_theme_##]/images/btn_first.gif" alt="처음 페이지로" /></a>
	<a href="#"><img src='/theme/[##_theme_##]/images/btn_prev.gif' alt="이전 페이지로" style="padding-right:20px;" /></a>
	<span class="numbers"><a href="javascript:void(0);" class="on">1</a></span>
	<span class="numbers"><a href="javascript:void(0);">2</a></span>
	<span class="numbers"><a href="javascript:void(0);">3</a></span>
	<span class="numbers"><a href="javascript:void(0);">4</a></span>
	<span class="numbers"><a href="javascript:void(0);">5</a></span>
	<a href="#"><img src="/theme/[##_theme_##]/images/btn_next.gif" alt="다음 페이지로" style="padding-left:20px;" /></a>
	<a href="#"><img src="/theme/[##_theme_##]/images/btn_end.gif" alt="마지막 페이지로" /></a>
	  -->
</div>
</td>
</tr>
<!-- //pageNO -->
<!-- //내용 -->

<tr><td height="50"></td></tr>
</table>

</s_templ_list>

<s_templ_write>
	<script type="text/javascript">
	//<![CDATA[
		function frmValid(){
			with(document.frmReg){
				if(!writer.value){
					alert("작성자를 입력하세요");
					writer.focus();
					return;
				}
				
				if(!title.value){
					alert("제목을 입력하세요");
					title.focus();
					return;
				}
				
				if(!content.value){
					alert("내용을 입력하세요");
					content.focus();
					return;
				}
				submit();
			}
		}
	//]]>
	</script>
	<form name="frmReg" method="post" action="/front/boardDbjob" enctype="multipart/form-data">
	<input type="hidden" name="dbjob" value="[##_hidden_dbjob_##]">
	<input type="hidden" name="id" value="[##_hidden_id_##]">
	<input type="hidden" name="no" value="[##_hidden_no_##]">
	<input type="hidden" name="board_name" value="[##_hidden_board_name_##]">
	<input type="hidden" name="ref_id" value="[##_hidden_ref_id_##]">
	<input type="hidden" name="depth" value="[##_hidden_depth_##]">
	<input type="hidden" name="ansnum" value="[##_hidden_ansnum_##]">
	<table width="100%">
	<tr><td colspan="2" height="1" bgcolor="#fe6700"></td></tr>
	<tr>
		<td width="150" style="padding:13px 0 0 0;"><font color="#fe6700">*</font> <strong>작성자</strong></td>
		<td width="620" style="padding:8px 0 8px 0;"><input type="text" class="txt-box" style="width:618px;" name="writer" value="[##_writer_##]" /></td>
	</tr>
	<tr><td colspan="2" height="1" bgcolor="#e6e6e6"></td></tr>
	<tr>
		<td width="150" style="padding:13px 0 0 0;"><font color="#fe6700">*</font> <strong>제목</strong></td>
		<td width="620" style="padding:8px 0 8px 0;"><input type="text" class="txt-box" style="width:618px;" name="title" value="[##_title_##]" /></td>
	</tr>
	<tr><td colspan="2" height="1" bgcolor="#e6e6e6"></td></tr>
	<tr>
		<td width="150" style="padding:13px 0 0 0;"><font color="#fe6700">*</font> <strong>내용</strong></td>
		<td width="620" style="padding:8px 0 8px 0;"><textarea name="content" class="txt-box" style="width:618px; height:200px;" />[##_content_##]</textarea></td>
	</tr>
	<tr><td colspan="2" height="1" bgcolor="#e6e6e6"></td></tr>
	<!-- <tr>
		<td width="150" style="padding:13px 0 0 0;"><font color="#fe6700">*</font> <strong>비밀번호</strong></td>
		<td width="620" style="padding:8px 0 8px 0;"><input type="text" class="txt-box" style="width:200px;" /></td>
	</tr> -->
	<tr><td colspan="2" height="1" bgcolor="#e6e6e6"></td></tr>
	<tr>
		<td width="150" style="padding:13px 0 0 0;"><font color="#828282">*</font> <strong>첨부파일</strong></td>
		<td width="620" style="padding:8px 0 8px 0;">
			<input type="file" id="" name="files[]" class="ip_i" style="width:100%;" value="" />
			[##_file_info1_##]
		</td>
	</tr>
	<tr><td colspan="2" height="1" bgcolor="#d6d6d6"></td></tr>
	</table>
	</form>
	<table>
	<tr>
		<td height="25"></td>
	</tr>
	<tr>
		<td align="center" style="margin:2px;">
			<span class="bt"><a href="javascript:history.back();">취소하기</a></span>
			<span class="bt"><a href="javascript:frmValid();">완료하기</a></span>
		</td>
	</tr>
	</table>
</s_templ_write>
<s_templ_view>
	<script type="text/javascript">
		//<![CDATA[  
		function frmValid(){
			with(document.frmComment){
				submit();
			}
			return;
		}
		
		function board(db){ //게시판 상세 액션별 페이지 분기
			var submit_url = '/front/boardDbjob';
			if(db == 'd'){
				if(!confirm("삭제 하시겠습니까?")) return;
			}else{
				submit_url = '/front/board/write/id/[##_hidden_id_##]/no/[##_hidden_no_##]';
			}
			
			with(document.frmReg){
				dbjob.value = db;
				action = submit_url;
				submit();
			}
		}
		
		function commentModify(cno){
			$.ajax({
				type: "POST",
				url: "/board/ajax_comment",
				data: $("[name=frmComment]").serialize()+'&no='+cno,
				success: function(data){
					$("[name=b_comment]").val(data);
					with(document.frmComment){
						dbjob.value = 'u';
						no.value = cno;
					}
				},
				error:function(error){
					alert('에러');
				}
			});
		}
		
		function commentDelete(cno){
			if(!confirm('삭제하시겠습니까?')) return;
			with(document.frmComment){
				dbjob.value = 'd';
				no.value = cno;
				submit();
			}
		}
		//]]>
	</script>
	<!-- 게시판 읽기[s] -->
<table>
 <tr>
	<td class="text_basic">
		<form name="frmReg" method="post" enctype="multipart/form-data">
			<input type="hidden" name="dbjob" value="">
			<input type="hidden" name="id" value="[##_hidden_id_##]">
			<input type="hidden" name="no" value="[##_hidden_no_##]">
			<input type="hidden" name="board_name" value="[##_hidden_board_name_##]">
		</form>
		<table width="100%">
		<tr><td colspan="4" height="1" bgcolor="#fe6700"></td></tr>
		<tr bgcolor="#f2f2f2" align="center">
			<td style="padding:8px 0 9px 0;"><strong>제목</strong></td>
			<td width="90" style="padding:8px 0 9px 0;"><strong>작성자</strong></td>
			<td width="85" style="padding:8px 0 9px 0;"><strong>등록일</strong></td>
			<td width="55" style="padding:8px 0 9px 0;"><strong>조회수</strong></td>

		</tr>
		<tr><td colspan="4" height="1" bgcolor="#c8c8c8"></td></tr>

		<!-- 한줄 -->
		<tr align="center" style="height:45px; line-height:43px;">
			<td align="left">[##_view_title_##]</td>
			<td>[##_view_writer_##]</td>
			<td>[##_view_date_##]</td>
			<td>[##_view_visited_##]</td>
		</tr>
		<tr><td colspan="4" height="1" bgcolor="#e6e6e6"></td></tr>
		<!-- //한줄 -->

		<!-- 게시물 -->
		<tr>
			<td colspan="4" style="padding:20px 0 40px 0;" width="770">
				<div>[##_view_file_##]</div>
				[##_view_content_##]
			</td>
		</tr>
		<!-- //게시물 -->
		<s_comment>
		<!-- 댓글 -->
		<!-- 입력 -->
		
		<tr>
			<td colspan="4" style="border:1px solid #d6d6d6; background-color:#f9f9f9; vertical-align:top;padding-bottom:15px;">
				<form name="frmComment" method="post" action="/front/boardCommentDbjob">
				<input type="hidden" name="dbjob" value="i" />
				<input type="hidden" name="name" value="[##_comment_name_##]" />
				<input type="hidden" name="user_id" value="[##_user_id_##]" />
				<input type="hidden" name="board_id" value="[##_board_id_##]" />
				<input type="hidden" name="board_no" value="[##_board_no_##]" />
				<input type="hidden" name="no" value="" />
					<table>
					<tr>
						<td><img src="/theme/[##_theme_##]/images/icon_re_box.gif" width="45" height="45" /></td>
						<td style="padding-top:15px;"><textarea name="b_comment" class="txt-box" style="width:605px; height:50px;" /></textarea></td>
						<td style="padding-top:15px;"><span class="bt_re"><a href="javascript:frmValid()">덧글등록</a></span></td>
					</tr>
					</table>
				</form>
			</td>
		</tr>
		<!-- //입력 -->
		<!-- 댓글리스트 -->
		<tr>
			<td colspan="4" style="height:42px; line-height:41px;">
				<table>
				<s_comment_list>
				<tr align="center">
					<td width="540" align="left" style="padding:12px 0 12px 0;line-height:16px;"><strong>[##_comment_content_##].</strong></td>
					<td width="90">[##_comment_name_##]</td>
					<td width="85">[##_comment_date_##]</td>
					<td width="55" style="padding-top:13px;"><a href="javascript:commentDelete([##_comment_no_##])"><img src="/theme/[##_theme_##]/images/icon_x.gif" /></a></td>
				</tr>
				<tr><td colspan="4" height="1" bgcolor="#e6e6e6"></td></tr>
				</s_comment_list>
				</table>
			</td>
		</tr>

		<tr><td colspan="4" class="text_sm" style="padding-top:5px;">* 덧글은 200자 이내로 입력해 주세요.</td></tr>
		<!-- //댓글리스트 -->
		</s_comment>
		
		<!-- 이전-이후 -->
		<tr><td colspan="4" height="30"></td></tr>
		<tr><td colspan="4" height="1" bgcolor="#d6d6d6"></td></tr>
		<tr>
			<td colspan="4">
			<table width="100%">
			<tr align="center" style="height:45px; line-height:43px;">
				<td width="70">▲</td>
				<td align="left"><a href="[##_view_prev_link_##]"><strong>[##_view_prev_title_##]</strong></a></td>
				<td width="90">[##_view_prev_writer_##]</td>
				<td width="85">[##_view_prev_date_##]</td>
			</tr>
			<tr><td colspan="4" height="1" bgcolor="#e6e6e6"></td></tr>
			<tr align="center" style="height:45px; line-height:43px;">
				<td>▼</td>
				<td align="left"><a href="[##_view_next_link_##]"><strong>[##_view_next_title_##]</strong></a></td>
				<td>[##_view_next_writer_##]</td>
				<td>[##_view_next_date_##]</td>
			</tr>
			<tr><td colspan="4" height="1" bgcolor="#d6d6d6"></td></tr>
			</table>
			</td>
		</tr>
		
		<!-- //이전-이후 -->

		</table>
	</td>
</tr>
<!-- //리스트 -->

<!-- 버튼 -->
<tr><td height="25"></td></tr>
<tr>
	<td align="center" style="margin:2px;">
		<span class="bt"><a href="/front/board/list/id/[##_hidden_id_##]">목록보기</a></span>
		<span class="bt"><a href="javascript:board('d');">삭제하기</a></span>
		<span class="bt"><a href="javascript:board('u');">수정하기</a></span>
		<span class="bt"><a href="javascript:board('r');">답변하기</a></span>
	</td>
</tr>
<!-- //버튼 -->
<!-- //내용 -->
<tr><td height="50"></td></tr>
</table>
<!-- 게시판 읽기[e] -->
</s_templ_view>
		
